<!DOCTYPE html>
<html>
<head>
    {include file="common/head_top"/}
    <link href="/static/res/css/common.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="main">
    {include file="common/head"/}
    <div class="tit_n">
        <span>当前位置：首页 > {$catname}</span>
    </div>
    <div class="content">
        {$info.content|raw}
    </div>
    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
    <script src="https://webapi.amap.com/maps?v=1.4.15&key=539ac77f4c6cd6f7ad3137793f451b68&plugin=AMap.ToolBar"></script>
    <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
    <div class="map_box">
        <div id="container"></div>
    </div>

    <script type="text/javascript">
        //初始化地图对象，加载地图
        var tit = '{$sys.title|raw}',ads = '{$sys.ads|raw}',lon = '{$sys.longitude|raw}',lat = '{$sys.latitude|raw}';
        var map = new AMap.Map("container", {
            zoom: 15,
            center: [lon,lat],
            resizeEnable: true,
            scrollWheel:false,
            mapStyle: 'normal'
        });
        var lnglats = [
            [lon,lat]
        ];

        var markerArr = [
            { title: tit, address: ads},
        ];

        var infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(20, -35)});
        for (var i = 0, marker; i < lnglats.length; i++) {
            var marker = new AMap.Marker({
                position: lnglats[i],
                icon:"/static/res/images/map.png",
                map: map
            });

            marker.content = "<p style=’font-size:12px;lineheight:1.8em;’>" + markerArr[i].address + "</br></p>";
            marker.on('click', markerClick);
            marker.emit('click', {target: marker});
        }

        function markerClick(e) {
            infoWindow.setContent(e.target.content);
            infoWindow.open(map, e.target.getPosition());

        }
        var toolbar = new AMap.ToolBar();
        map.plugin(toolbar);
        map.setFitView();

        /*map.setLang('en');*/
    </script>
    <style>
        .amap-copyright{display: none!important;}
        .amap-info-content{ padding:10px 20px}
        .amap-info-content h4{ font-size:16px; color:#333; margin-top:10px; margin-bottom:0}
        .amap-info-content p{ font-size:12px; line-height:26px; color:#404040; margin:10px 0}
    </style>


    {include file="common/footer"/}
</div>
{include file="common/foot"/}
</body>
</html>